<template>
  <div>
    Loading
    <Loading />
  </div>
</template>

<script setup lang="ts">
  import {ref, inject} from 'vue'
  import Loading, {useLoading, Props, } from 'vue-loading-overlay'

  const props = withDefaults(defineProps<Props>(), {
    isFullPage: false,
    // container:
  })

  const $loading = useLoading(props);

  defineExpose($loading)

  const submit = () => {
      const loader = $loading.show({
        // Optional parameters
      });
      // simulate AJAX
      setTimeout(() => {
          loader.hide()
      }, 50000)
  }
  submit()
</script>

<style lang="less" scoped>

</style>
